package com.yh.csx.crm.qo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yh.csx.crm.core.entity.Pagination;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * ReprotAccountAgesQo class
 *
 * @author huyalin
 * @date 2019/3/15
 */
@Data
public class ReprotAccountAgesQo extends Pagination {

    private List<String> custIds;

    @ApiModelProperty("客户编码")
    private String customerNumber;

    @ApiModelProperty("搜索关键字(客户名称/客户编号)")
    private String kw;

    @ApiModelProperty("排序属性: 1-金额(默认)，2-天数")
    private Integer orderField;

    @ApiModelProperty("排序类型: 0-升序，1-降序(默认)")
    private Integer sortType;

    @JsonIgnore
    public String getOrderType() {
        return sortType == null || sortType.equals(1) ? "DESC" : " ASC";
    }

    @JsonIgnore
    public String getOrderCol() { return orderField == null || orderField.equals(1) ? "ac_over" : "max_ac_day+0"; }
}
